package com.bm.specialvehiclefordispatcher.logics;

import com.bm.corelibs.logic.BaseLogic.NListener;
import com.bm.specialvehiclefordispatcher.bean.BaseData;
import com.bm.specialvehiclefordispatcher.constants.Urls;

public class MessageManager extends BaseManager {

	private String sentUser;

	public MessageManager(String sentUser) {
		this.sentUser = sentUser;
	}

	@Override
	protected void getList(NListener<BaseData> l) {
		logic.edit().resetAll().addParam("sentUser", sentUser + "").addParam("pageNo", page.pageNo + "").addParam("sentObject", "2").addParam("pageSize", Integer.MAX_VALUE + "").setUrl(Urls.GET_MYSENTLOGS).setBaseClass(BaseData.class).setListener(l);
		logic.doPost();

	}

	public void removeMessage(long id, NListener<BaseData> listener) {
		logic.edit().addParam("id", id + "").setBaseClass(BaseData.class).setUrl(Urls.REMOVE_MESSAGE).setListener(listener);
		logic.doPost();
	}
}
